﻿namespace SPWikiProvisioning.Model
{
    internal class LocalizableString
    {
        public LocalizableString(string formattedString)
        {
            string[] parts = formattedString.Split(",".ToCharArray()); // "$Resouces:file", "source;"
            string[] parts2 = parts[0].Split(":".ToCharArray()); // "$Resources", "file"
            this.Source = parts2[0] + ":" + parts[1].Replace(";", string.Empty); // "$Resources:source"
            this.DefaultResourceFile = parts2[1]; // "file"
        }

        public string DefaultResourceFile { get; set; }

        public string Source { get; set; }
    }
}
